package com.javayh.service.impl;

import com.javayh.dao.RoleDao;
import com.javayh.entity.Role;
import com.javayh.service.RoleService;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.xml.ws.Action;

/**
 * @author Dylan Yang
 * @Title: RoleServiceImpl
 * @ProjectName lucky
 * @Description: TODO
 * @date 2018/10/217:12
 */
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleDao roleDao;

    @Override
    public int saveRole(Role role) {
        int saveRole = this.roleDao.saveRole(role);
        if (saveRole > 0){
            return saveRole;
        }
        return 0;
    }

    @Override
    public int modfiyRole(Role role) {
        int modfiyRole = roleDao.modfiyRole(role);
        if (modfiyRole > 0){
            return modfiyRole;
        }
        return 0;
    }

}

